import request from '@/utils/request'

// 查询打印机管理列表
export function listPrinter(query) {
  return request({
    url: '/equipment/printer/list',
    method: 'get',
    params: query
  })
}

// 查询打印机管理详细
export function getPrinter(printerId) {
  return request({
    url: `/equipment/printer/${printerId}`,
    method: 'get'
  })
}

// 新增打印机管理
export function addPrinter(data) {
  return request({
    url: '/equipment/printer',
    method: 'post',
    data: data
  })
}

// 修改打印机管理
export function updatePrinter(data) {
  return request({
    url: '/equipment/printer',
    method: 'put',
    data: data
  })
}

// 删除打印机管理
export function delPrinter(printerId) {
  return request({
    url: `/equipment/printer/${printerId}`,
    method: 'delete'
  })
}

// 打印机打印
export function printVinCode(data) {
  return request({
    url: '/common/printVinCode',
    method: 'post',
    data
  })
}
